package com.aspose.cells;

abstract class zgh implements zaft {
   protected zaay a;
   private zahz b;
   private zfv c = new zfv();
   private Worksheet d;
   private zagu e;
   private boolean f = false;

   zgh(zaay var1, zahz var2) {
      this.a = var1;
      this.b = var2;
   }

   protected abstract boolean a(zp var1);

   protected abstract boolean a(zyi var1);

   void a(Worksheet var1) {
      this.d = var1;
   }

   public boolean a(zp var1, int var2) {
      if (this.a(var1)) {
         return false;
      } else {
         zfv var3 = var1.a(var2, this.c, 4);
         if (var3.c == 5) {
            zyi var4 = (zyi)var3.d;
            if (this.a(var4)) {
               return false;
            }
         }

         if (this.a.p.G) {
            Object var5 = this.a.p.F.get(Cell.a(this.d.getIndex(), var1.h(), var3.a));
            if (var5 != null) {
               this.e = this.b.a((zagu)var5, this.a, true);
            } else {
               this.e = this.b.a(zaaq.a(this.d, var3, false, this.a), this.a, true);
            }
         } else {
            this.e = this.b.a(zaaq.a(this.d, var3, false, this.a), this.a, true);
         }

         if (this.e != null && this.e.b() == 0) {
            this.f = true;
            return true;
         } else {
            return false;
         }
      }
   }

   public boolean a() {
      return this.f;
   }

   public zagu b() {
      return this.f ? this.e : this.b.a();
   }
}
